Method for encoding and decoding video, and apparatus using same

ABSTRACT

The present invention relates to a technique for encoding and decoding video data, and more particularly, to a method for performing inter-prediction in an effective manner. The present invention combines an inter-prediction method using an AMVP mode and an inter-prediction method using a merge mode so as to propose a method for using the same candidate. The method for encoding video data proposed by the present invention comprises the following steps: receiving mode information on an inter-prediction method of a current block; determining, on the basis of the received mode information, whether the interprediction method to be applied to the current block is an AMVP mode or a merge mode; and selecting a candidate to derive motion information of the current block, wherein the candidate is selected in a left region, top region and corner region of the current block and in the same position block as the current block, and the AMVP mode and the merge mode are applied on the basis of the selected candidate.

TECHNICAL FIELD

The present invention relates to an image compression technique, andmore particularly, to an inter prediction method and device.

BACKGROUND ART

Recently, demands for high resolution and high quality images have beenincreased in a variety of application fields. However, as images have ahigher resolution and higher quality, the amount of information on thecorresponding images is further increased. Accordingly, if imageinformation is transmitted using media such as typical wired andwireless broadband lines or image information is stored using typicalstorage media, information transfer costs and storage costs areincreased.

In order to effectively transmit, store, or play information on highresolution and high quality images, a highly-efficient image compressiontechnique may be used.

In order to improve the efficiency of image compression, interprediction and intra prediction may be used. Pixel values of a currentpicture are predicted with reference to information on another picturein inter prediction method, and pixel values by using a relationshipbetween pixels in the same picture in intra prediction method.

DISCLOSURE Technical Problem

The present invention provides a prediction method to increase theefficiency of image compression.

The present invention also provides a method to effectively provideinter prediction.

The present invention also provides a method to increase the compressionefficiency of image information and maintaining image qualitysimultaneously.

The present invention also provides a method to reduce the amount ofinformation processed during image information encoding/decoding.

The present invention also provides a method to reduce the complexity ofimage information encoding/decoding.

Technical Solution

In an aspect, a method of encoding image information includesdetermining a prediction mode of a current block, and when thedetermined prediction mode is a skip mode, transmitting information thatspecifies one prediction direction among a forward direction, a backwarddirection, or a bi-direction.

In another aspect, a method of decoding image information includesdetermining a prediction mode of a current block, and when theprediction mode of the current block is a skip mode, according toinformation that indicates a prediction direction, setting theprediction direction of the skip mode as a uni-direction or abi-direction.

In another aspect, a method of encoding image information includeschecking costs for using each candidate with respect to AMVP candidates,comparing the sameness between a merge candidates and the AMVPcandidates, checking costs for a merge candidate which is different fromthe AMVP candidate, and based on the checked costs, determining an interprediction mode that is to be applied to a current block.

In another aspect, a method of decoding image information includesselecting AMVP candidates from neighboring area of a current block,determining the sameness between the AMVP candidates and mergecandidates, and based on the sameness determination result, merging thecurrent block into a merge candidate which may be different from theAMVP candidates.

In another aspect, a method of encoding image information includesselecting AMVP candidates from neighboring area of a current block andconfiguring an AMVP candidate list, determining whether there is a mergecandidate not included in the AMVP candidate list, and when there is amerge candidate not included in the AMVP candidate list, performing asignaling operation to add the merge candidate to the AMVP candidatelist or change a predetermined candidate among the candidates of theAMVP candidate list into the merge candidate.

In another aspect, a method of decoding image information includesselecting AMVP candidates from neighboring area of a current block andconfiguring an AMVP candidate list, if there is a merge candidate notincluded in the AMVP candidate list, adding the merge candidate to theAMVP candidate list or changing a predetermined candidate among thecandidates of the AMVP candidate list into the merge candidate, andpredicting with respect to a current block on the basis of the changedAMVP candidate list.

In another aspect, a method of encoding image information includesdetermining a prediction method applied to a current block among aninter prediction method using an AMVP and an inter prediction methodusing a merge mode, and transmitting information on the determinedprediction method. Here, candidates of the AMVP and candidates of themerge mode may be integrated and used.

In another aspect, a method of decoding image information includesreceiving mode information on an inter prediction method of a currentblock, and selecting candidates for deriving motion information on thecurrent block. Here, the candidates may be selected from the left area,top area, and corner area of the current block and a co-located blockwith respect to the current block. Moreover, the candidates, as blocksspecifically positioned in the left area, top area, and corner area ofthe current block, may be blocks of an inter prediction mode. Inaddition, the candidates may be the bottom block at the left area of thecurrent block, the rightmost block at the top area of the current block,and the left below corner block, left top corner block, and right topcorner block with respect to the current block.

Advantageous Effects

According to the present invention, the compression efficiency of imageinformation is increased and image quality is maintained simultaneously.

According to the present invention, the amount of information processedduring image information encoding/decoding is reduced and the efficiencyof image information processing is improved.

According to the present invention, the complexity of image informationencoding/decoding is reduced and the efficiency of image informationprocessing is improved.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an image encoding deviceaccording to an embodiment of the present invention.

FIG. 2 is a conceptual diagram illustrating a prediction unit accordingto an embodiment of the present invention.

FIG. 3 is a view illustrating a quad tree structure of a processing unitin a system according to an embodiment of the present invention.

FIG. 4 is a block diagram illustrating an image decoding unit accordingto an embodiment of the present invention.

FIG. 5 is a conceptual diagram illustrating a prediction unit of animage decoding device according to an embodiment of the presentinvention.

FIG. 6 is a view illustrating an AMVP mode in a system according to anembodiment of the present invention.

FIG. 7 is a view when a merge mode is applied in a system according toan embodiment of the present invention.

FIG. 8 is a view illustrating a method of configuring prediction modeinformation and transmitting it in an encoder according to an embodimentof the present invention.

FIG. 9 is a flowchart illustrating a method of calculating costs forprediction candidates in an encoder according to an embodiment of thepresent invention.

FIG. 10 is a flowchart illustrating a method of performing merging in adecoder according to an embodiment of the present invention.

FIG. 11 is a flowchart illustrating an operation of changing an AMVPcandidate in an encoder according to an embodiment of the presentinvention.

FIG. 12 is a view illustrating a method of performing prediction on thebasis of an AMVP list changed in a decoder according to an embodiment ofthe present invention.

FIG. 13 is a flowchart illustrating a signaling method of selecting adirect mode and a merge mode according to an embodiment of the presentinvention.

FIG. 14 is a view illustrating signaling through the integration of adirect mode and a merge mode according to an embodiment of the presentinvention.

FIG. 15 is a view illustrating signaling whether a direct mode is to beapplied or a coding block merge is to be applied through a flagaccording to an embodiment of the present invention.

FIG. 16 is a view illustrating a method of deriving a determination onwhether to apply a direct mode or a coding block merge according to anembodiment of the present invention.

FIG. 17 is a flowchart illustrating signaling when an integrated mode isapplied according to an embodiment of the present invention.

FIG. 18 is a view illustrating an area where candidate blocks of anintegrated mode are selected according to an embodiment of the presentinvention.

FIG. 19 is a flowchart illustrating a method of generating a predictioncandidate by applying an integrated mode and transmitting correspondinginformation in an encoder according to an embodiment of the presentinvention.

FIG. 20 is a flowchart illustrating a method of performing prediction byapplying an integrated mode in a decoder according to an embodiment ofthe present invention.

MODE FOR INVENTION

The present invention may be embodied with many different modificationsand thus may include several embodiments. Therefore, specificembodiments will be shown in the drawings and described in detail.However, this does not intend to limit the specific embodiments of thepresent invention. The terms herein are used only for explaining thespecific embodiments of the present invention while not limiting thetechnical idea of the present invention. A singular form used for theterms herein may include a plural form unless being clearly differentfrom the context. In this specification, the meaning of “include,”“comprise,” “including,” or “comprising,” specifies a property, aregion, a fixed number, a step, a process, an element and/or a componentbut does not exclude other properties, regions, fixed numbers, steps,processes, elements and/or components.

Each component on the drawings described herein is separately providedfor convenience of description on different feature functions in animage encoding/decoding device, and is not limited to being implementedwith separate hardware or software. For example, at least two componentsmay be combined to constitute one component, or one component may besplit into several components. Embodiments including integrated and/orseparated components are included in the scope of the present inventionwithout departing from the sprit of the present invention.

Hereinafter, with reference to the accompanying drawings, preferredembodiments of the present invention will be described in more detail.Hereinafter, like reference numerals refer to like elements throughout,and their overlapping descriptions will be omitted.

FIG. 1 is a block diagram illustrating an image encoding deviceaccording to an embodiment of the present invention. Referring to FIG. 1, the image encoding device 100 includes a picture splitting module 105,a prediction module 110, a transform module 115, a quantization module120, a rearrangement module 125, an entropy encoding module 130, aninverse quantization module 135, an inverse transform module 140, afilter module 145, and a memory 150.

The picture splitting module 105 may split an inputted picture by atleast one processing unit. At this point, the processing unit may be aPrediction Unit (PU), a Transform Unit (TU), or a Coding Unit (CU).

The prediction module 110, as described later, includes an interprediction module for performing inter prediction and an intraprediction module for performing intra prediction. The prediction module110 performs prediction on the processing unit of a picture split in thepicture splitting module 105 in order to generate a prediction block.The processing unit of a picture in the prediction module 110 may be CU,TU, or PU. Additionally, after determination is made on whetherprediction performed on a corresponding processing unit is interprediction or intra prediction, the specific details of each predictionmethod (for example, a prediction mode) may be determined. At thispoint, the processing unit for performing prediction may be differentfrom that for determining a prediction method and specific details. Forexample, a prediction method and a prediction mode may be determined byPU and prediction may be performed by TU.

A residual (for example, a residual block or a residual signal) betweena generated prediction block and an original block is inputted to thetransform module 115. Additionally, prediction mode information andmotion vector information used for prediction are encoded together withthe residual in the entropy encoding module 130, and then delivered to adecoder.

The transform module 115 performs transformation on a residual block byTU and generates transform coefficients. The transform module 115 mayuse TU for transformation and TU may have a quad tree structure. At thispoint, the size of TU may be determined within a range of apredetermined maximum and minimum size. The transform module 115 maytransform a residual block through Discrete Cosine Transform (DCT)and/or Discrete Sine Transform (DST).

The quantization module 120 may generate quantization coefficients byquantizing the residuals transformed by the transform module 115. Thevalue obtained by the quantization module 120 is provided to thedequantization module 135 and the rearrangement module 125.

The rearrangement module 125 rearranges the provided quantizationcoefficients from the quantization module 120. By rearranging thequantization coefficients, the encoding efficiency in the entropyencoding module 130 may be improved. The rearrangement module 125 mayrearrange the quantization coefficients of a two dimensional block formin a one dimensional vector form through a coefficient scanning method.The rearrangement module 125 may change the order of coefficientscanning on the basis of stochastic statistics for the deliveredcoefficients from the quantization module 120, thereby improving theentropy encoding efficiency in the entropy encoding module 130.

The entropy encoding module 130 may perform entropy encoding on thequantization coefficients rearranged by the rearrangement module 125.The entropy encoding may use an encoding method such as ExponentialGolomb, Context-Adaptive Variable Length Coding (CAVLC), andContext-Adaptive Binary Arithmetic Coding (CABAC). The entropy encodingmodule 130 may encode various information such as quantizationcoefficient information and block type information, prediction modeinformation, partition unit information, prediction unit information andtransmission unit information, motion vector information, referencepicture information, interpolation information of a block, and filteringinformation, delivered from the rearrangement module 125 and theprediction module 110.

The dequantization unit 135 dequantizes the values quantized by thequantization module 120, and the inverse transform module 140inverse-transforms the value dequantized by the dequantization module135. The residual generated by the dequantization module 135 and theinverse transform module 140 may be combined with the prediction blockpredicted by the prediction module 110 in order to generate areconstructed block.

The filter module 145 may apply a deblocking filter and/or an AdaptiveLoop Filter (ALF) to a reconstructed picture.

The deblocking filter may remove block distortion occurring at theboundary between blocks in the reconstructed picture. The ALF mayperform filtering on the basis of a value obtained by comparing areconstructed image with an original image after a block is filteredthrough the deblocking filter. The ALF may be used only when highefficiency is applied.

Moreover, the filter module 145 may not apply filtering on areconstructed block used for inter prediction

The memory 150 may store the reconstructed block or picture calculatedby the filter module 145. The reconstructed block or picture stored inthe memory 150 may be provided to the prediction module 110 forperforming inter prediction.

The CU is a unit by which encoding/decoding of a picture is performed,has a depth on the basis of a quad tree structure, and can be split. TheCU may have several sizes such as 64×64, 32×32, 16×16, and 8×8.

An encoder may transmit information on a Largest Coding Unit (LCU) and aSmallest Coding Unit (SCU) to a decoder. Besides the information on anLCU and a SCU, information on the number of available divisions (i.e.depth information) may be transmitted to a decoder. Information onwhether the CU is split on the basis of a quad tree structure may betransmitted from an encoder to a decoder through flag information suchas a split flag. Hereinafter, unless otherwise described, “transmission”in this specification means information delivery from an encoder to adecoder.

FIG. 2 is a conceptual diagram illustrating a prediction moduleaccording to an embodiment of the present invention.

Referring to FIG. 2 , the prediction module 200 may include an interprediction module 210 and an intra prediction module 220.

The inter prediction module 210 may perform prediction on the basis ofinformation on at least one picture among previous pictures and/orfollowing pictures of a current picture in order to generate aprediction block. Additionally, the intra prediction module 220 mayperform prediction on the basis of pixel information on a currentpicture in order to generate a prediction block. The inter predictionmodule 210 may select a reference picture for a prediction unit, and mayselect a reference block which may have the same size as a predictionunit, as an integer pixel sample unit. Then, the inter prediction module210 generates a prediction block in which a residual signal with respectto a current prediction unit is minimized and the size or magnitude of amotion vector is also minimized. The prediction block may be generatedby a sample unit of less than an integer such as a ½ pixel sample unitand a ¼ pixel sample unit.

At this point, a motion vector may be expressed with a unit of less thanan integer pixel, and for example, may be expressed with a ¼ pixel unitwith respect to a luma pixel and expressed with a ⅛ pixel unit withrespect to a chroma pixel.

Information on the index of a reference picture, a motion vector (forexample, a motion vector predictor), and a residual signal which areselected by the inter prediction module 210 is encoded and delivered toa decoder.

FIG. 3 is a view illustrating a quad tree structure of a processing unitin a system according to an embodiment of the present invention.

An LCU 300 may have a hierarchical structure consisting of smallerencoding units 310 through splits and the size of a hierarchicalstructure of a coding unit may be specified based on size information,depth information, and split flag information, etc. The size informationon an LCU, split depth information, and information on whether a currentencoding unit is split may be included a Sequence Parameter Set (SPS) onbitstream and is transmitted to an image decoding unit. However, sincean SCU is no longer split into a smaller coding unit, a split flag of anencoding unit with respect to an SCU may not be transmitted.

Moreover, determination may be made on which one of an inter predictionand an intra picture prediction is performed by a CU unit. When an interprediction is performed, an inter prediction may be performed by a PU.When an intra picture prediction is performed, a prediction mode may bedetermined by a PU so that prediction may be performed by a PU. At thispoint, a prediction mode may be determined by a PU and an intra pictureprediction may be performed by a TU.

Referring to FIG. 3 , in the case of an intra picture prediction, the PU320 may have the size of 2N×2N or N×N (N is an integer) and in the caseof an inter prediction, the PU 330 may have the size of 2N×2N, 2N×N,N×2N, or N×N (N is an integer). At this point, in the case of N×N, forexample, it may be determined to be applied to only an specific casesuch as SCU or an intra picture prediction. Additionally, besides thesize of a prediction block, N×mN, mN×N, 2N×mN, or mN×2N (m<1) may befurther defined and used.

FIG. 4 is a block diagram illustrating an image decoding deviceaccording to an embodiment of the present invention. Referring to FIG. 4, the image decoding device 400 includes an entropy decoding module 410,a rearrangement module 415, a dequantization module 420, an inversetransform module 425, a prediction module 430, a filter module 435, anda memory 440.

When an image bitstream is inputted into an image decoding device, itmay be decoded according to an image processing procedure which isapplied in the image encoding device.

For example, when Variable Length Coding (VLC) such as CAVLC is used inorder to perform entropy encoding in an image encoding device, theentropy decoding module 410 may perform entropy decoding with the sameVLC table as that used in the image encoding device. When CABAC is usedin order to perform entropy encoding in an image encoding device, theentropy decoding module 410 may perform entropy decoding through theCABAC in correspondence thereto.

The entropy decoding module 410 entropy-decodes information in thetransmitted entropy-encoded bitstream. Information for generating aprediction block among information decoded in the entropy decodingmodule 410 may be provided to the prediction module 430, and residualsobtained through entropy decoding in the entropy decoding module 410 maybe inputted to the rearrangement module 415.

The rearrangement module 415 may rearrange the bitstream entropy-decodedby the entropy decoding module 410 based on a rearrangement method of animage encoding device. The rearrangement module 415 may rearrangecoefficients in a one directional vector form into those in a seconddimensional block form. The rearrangement module 315 performsarrangement through a method that receives information relating to thecoefficient scanning performed by an encoder and performs inversescanning on the basis of the scanning order performed by a correspondingencoding unit.

The dequantization module 420 may perform dequantization on the basis ofa quantization parameter provided from an encoder and a coefficientvalue of a rearranged block.

The inverse transform module 425 may perform inverse DCT and/or inverseDST with respect to DCT and DST that a transform unit of an encoderperforms, on a quantization result of an image encoding device. Inversetransformation may be performed by a transmission unit or an image splitunit determined by an encoder. DCT and/or DST in a transform module ofan encoder may be selectively performed according to info nation on thesize or prediction direction of a current block, and the inversetransform module 425 of a decoder may perform inverse transformation onthe basis of the transform information from a transform module of anencoder.

The prediction module 430 may generate a prediction block on the basisof the prediction block generation related information provided from theentropy decoding module 410 and the previously decoded block and/orpicture information provided from the memory 440. A reconstructed blockmay be generated by using a prediction block generated by the predictionmodule 430 and a residual block provided from the inverse transformmodule 425.

The reconstructed block and/or picture may be provided to the filtermodule 435. The filter module 435 applies deblocking filtering, SampleAdaptive Offset (SAO), and/or adaptive loop filtering on thereconstructed block and/or picture.

The memory 440 may store the reconstructed picture or block in order touse it as a reference picture or a reference block, or may provide thereconstructed picture to an output unit.

FIG. 5 is a conceptual diagram illustrating a prediction module of animage decoding device according to an embodiment of the presentinvention.

Referring to FIG. 5 , the prediction module 500 may include an intrapicture prediction module 510 and an inter prediction module 510.

When a prediction mode for a corresponding prediction unit is an intraprediction mode (i.e., an intra picture prediction mode), the intrapicture prediction module 510 may generate a prediction block on thebasis of pixel information in a current picture.

When a prediction mode for a corresponding prediction unit is an interprediction mode (i.e., an inter prediction mode), the inter predictionmodule 520 performs an inter prediction on a current prediction unit byusing motion information necessary for inter prediction of a currentprediction unit provided from an image encoding device, for example,information on a motion vector and a reference picture index, etc., onthe basis of information in at least one picture among previous picturesor following pictures of a current picture including a currentprediction unit. At this point, after the skip flag and the merge flagof a received encoding unit are confirmed, motion information may bederived according thereto.

Although the case that the prediction module 500 includes each functioncomponent is described, for convenience of description, the presentinvention is not limited thereto. That is, the prediction module 500 mayinclude a single component for performing the above functions.

In the case of an inter prediction mode, a method of deriving motioninformation in an encoding device and a decoding device includes a skipmode, a direct mode, and a merge mode, etc.

The skip mode and the direct mode use motion information derived fromcandidate Motion Vector Predictors (MVPs) in an Advanced Motion VectorPredictor (AMVP). For convenience of description, the skip mode and thedirect mode together are referred to as an AMVP mode. For example, inthe AMVP mode, a motion vector of a current block with respect to areference picture may be derived using the sum of a Motion VectorDifference (MVD) of a current block and a neighbor block with respect tothe reference picture and a Motion Vector Predictor (MVP) of aneighboring block with respect to the reference picture.

In relation to a block having the direct mode applied, a residual blockcorresponding to a difference value of a prediction block, generatedbased on a reference block that the motion vector of the block of thedirect mode indicates, and a current block may be transmitted. Inrelation to a block having the skip mode applied (for example, aprediction unit), a residual signal may not be transmitted from anencoder to decoder. In the case of the skip mode, a value of aprediction block may be used as a value of a current block.

In the case of the merge mode applied, a merge candidate among neighborblocks of a current block (i.e., a prediction target block) may bedetermined and motion information on one of merge candidates may be usedas motion information of a current block. A residual signal with respectto a current block having a merge mode applied may be transmitted.

FIG. 6 is a view illustrating an AMVP mode in a system according to anembodiment of the present invention.

When an AMVP is applied, the best MVP may be selected by applying MotionVector Competition (MVC) on MVPs of an available candidate blocks arounda current block and/or an available block among partitions of eachreference picture which are co-located with a current block. Here, theavailable block among partitions of each reference picture which areco-located with a current block may be referred to as a co-located blockand the reference picture may be referred to as a target picture. Amotion vector of a current block may be derived based on the best MVP.Moreover, when a neighbor block of a current block is an interprediction mode, it may not be an available block.

Referring to embodiment of FIG. 6 , while searching is made in the arrowdirection at the left area 610 of a current block, an MVP of the firstblock A may be selected as one of an AMVP candidate. Here, the firstblock is the block that is found at first as a block being available andhaving identical reference index indicating reference picture with thecurrent picture.

Although the case that searching is made from the top to the bottomalong the arrow direction in FIG. 6 is described, which is one exampleof a method of selecting an AMVP candidate at the left area of thecurrent block, searching may be made from the bottom to the top unlikeFIG. 6 .

Additionally, instead of searching the entire left area of the currentblock in order, a specific block at the left area may be steadily usedas an AMVP candidate. For example, the MVP of the bottom block at theleft area which meets the corner block C 630 may be used as the AMVPcandidate of the left area.

An AMVP candidate may be selected from the top of the current block.Referring to embodiment of FIG. 6 , during search in the arrow directionat the top area 620 of the current block, an MVP of the first block Bhaving the same reference index as the current block and available maybe selected as an AMVP candidate for the top area.

Although the case that searching is made from the left to the right ofthe current block is described, which is one example of a method ofselecting an AMVP candidate at the top area of the current block,searching may be made from the right to the left unlike FIG. 6 .

Additionally, instead of searching the entire top area of the currentblock in order, a specific block may be steadily used as an AMVPcandidate with respect to the top area of the current block. Forexample, the MVP of the right block at the top area which meets thecorner block C 640 may be used as the AMVP candidate for the top area ofthe current block.

An AMVP candidate may be selected from the corner blocks 630, 640, and650 of the current block. Referring to FIG. 6 , while searching is madein the order of the top right corner block 640→the top left corner block650→the bottom left corner block 630, the MVP of the first block havingthe same reference index as the current block and available may beselected with respect to the corner blocks Cs.

Although searching of the corner block in the order of the top right→thetop left→the bottom left is described with reference to FIG. 6 , whichis one example of a method of selecting an AMVP candidate from cornerblocks, unlike FIG. 6 , searching may be made in the order of the bottomleft→the top left→the top right, or in the order of the top left→the topright→the bottom left or the top left→the bottom left→the top right.Additionally, instead of searching each corner block in order, all MVPsin each corner block may be selected as an AMVP candidate.

Besides the AMVP candidates for each area (the left/top/corner area ofthe current block) described above, a combination of the AMVP candidatesfor each area may be selected as one of the AMVP candidates. Forexample, a median value of each motion information on the MVPs selectedfrom the left area, top area, and corner area of the current block maybe taken as one of AMVP candidates.

Besides a method of selecting an AMVP candidate from blocks spatiallyadjacent to the current block, an MVP of a co-located block may beselected as an AMVP candidate.

The best MVP is selected through MVC with the selected AMVP candidates,and motion information on a current block may be represented based onthe selected optical MVP.

For example, when AMVP candidates are selected by a prediction unit ofan encoding device/decoding device, redundant MVPs may be excluded inorder to reduce redundancy, and then, an AMVP candidate list may becreated. In other words, after leaving only one MVP among redundant nMVPs, the remaining n−1 MVP may be excluded from the AMVP candidatelist.

The number and order of MVPs constituting the AMVP candidate list may bespecified. For example, after selecting a predetermined number ofcandidates from candidates around a current block and selecting onecandidate from the co-located blocks, an AMVP candidate list may becreated. At this point, an order to determine availability of candidatesconstituting an AMVP candidate list may be specified, and then,candidates determined to be available first according to the order mayconstitute a list. When a candidate block is in an intra pictureprediction mode, it is regarded as an unavailable MVP and is excludedfrom AMVP candidates.

The prediction module may calculate costs for candidates in the AMVPcandidate list in order to select the best MVP. In this case, bycomparing the cost for the selected MVP from the AMVP candidate listwith that for an MVP at a specific position or an MVP obtained through aspecific calculation result, only one MVP may be determined.

As described above, when the best MVP is derived through the AMVP, theskip mode or the direct mode may be applicable using the best MVP.

FIG. 7 is a view when a merge mode is applied in a system according toan embodiment of the present invention.

When the merge mode is applied, motion information on a current blockmay be represented using one motion information on blocks around thecurrent block. For example, a motion vector for one reference block(picture) among blocks around the current block may be used as that ofthe current block. At this point, a residual signal may be transmittedtogether with motion information, and when the pixel value of aprediction block is used as that of the current block, a residual signalmay not be transmitted. Here, the blocks around the current blockinclude co-located block.

For example, as shown in embodiment of FIG. 7 , the block 710 selectedat the left area of the current block and the block 720 selected at thetop area of the current block may be used as merge candidates. At thispoint, as shown in FIG. 7 , the block selected at the left area of thecurrent block may be a block at the left top and the block selected atthe top area of the current block may be a block at the top left.

Additionally, when the merge mode is applied, in a way similar to theAMVP mode, a co-located block may be used as one of candidates andblocks at the corner of the current block may be used as candidates.

In this way, merge candidates may be selected and one candidate may beselected from the merge candidates. Then, motion information on thecurrent block may be represented using the motion vector of the selectedcandidate. For example, when merge candidates are selected by aprediction module of an encoding device/decoding device, redundantcandidates may be excluded in order to reduce redundancy, and then, amerge candidate list may be created.

The number and order of candidates constituting the merge candidate listmay be specified. For example, a predetermined number of candidates maybe selected from blocks around the current block and one candidate maybe selected from the co-located blocks. At this point, an order todetermine availability of candidates may be specified. Then, afterdetermining of the availability of candidates according to the order,candidates determined to be available first may constitute a list. Ablock in an intra picture prediction mode may be determined as anunavailable block.

The prediction module may calculate costs for candidates in a mergecandidate list in order to select the best candidate block. As mentionedabove, once one candidate block is selected from the merge candidatelist, the current block may be merged into the selected candidate block.When the current block is merged into the selected candidate block,motion information on the selected candidate block may be used as motioninformation on the current block.

Moreover, by comparing the cost for using the MVP selected by the AMVPwith the cost for applying a merge mode, an encoding device may performthe inter prediction of the current block by using one of an AMVP modeand a merge mode.

<Direction Indication of Prediction Mode>

When the above-mentioned methods of deriving motion information are usedfor an encoding device, the encoding device may transmit information forderiving motion information of a current block to a decoding device.

The transmitted information first notifies that a skip mode is appliedaccording to whether there is a residual signal, and when the skip modeis applied, allows prediction to be performed according thereto.Information on whether the skip mode is to be applied may be deliveredthrough a flag for skip mode application (hereinafter, referred to asskip_flag).

When skip_flag indicates that a skip mode is not applied, it mayindicate that a direct mode is applied. At this point, by designating anindex for prediction mode and transmitting an index designated for adirect mode (for example, pred_mode==0), information that the directmode is applied to a current block may be delivered.

When the merge mode is applied, an encoding device may transmitinformation on the merge mode to a decoding device. For example, with aflag (hereinafter, referred to as a merge_flag) indicating informationon whether a merge mode is applied, whether the merge mode is to beapplied to a corresponding block may be notified to a decoding device.

Table 1 illustrates a syntax structure used for transmitting informationon a method of deriving motion information according to an embodiment ofthe present invention.

TABLE 1   prediction_unit( ) { .....  skip_flag  if (skip_flag==1)  decoding with skip mode  }  else  {   pred_mode   if (pred_mode==0)  {   decoding with direct mode   }   if (pred_mode==MODE_INTER)   {   merge_flag    if (merge_flag==1)     merge_left_flag     decodingwith merge mode      }   }  } ..... }

Here, skip_flag is a flag indicating whether a skip mode is applied, andindicates that the skip mode is applied when a value of skip_flag is 1.Additionally, merge_flag is a flag indicating whether a merge mode isapplied, and indicates that the merge mode is applied when a value ofmerge_flag is 1. However, Table 1 is one example of applying the abovecontents. Table 1 may also be defined to apply a skip mode when a valueof skip_flag is 0 or apply a merge mode when a value of merge_flag is 0.

In Table 1, pred_mode is a syntax indicating which prediction mode isapplied and pred_mode==0 is a value indicating that a direct mode isapplied.

merge_left_flag is a flag indicating that a current block is merged intowhich side of a merge candidate. For example, when merge_left_flag==1,it indicates that a current block is merged into a merge candidateselected from the left of the current block and when merge_left_flag==0,it indicates that a current block is merged into a merge candidateselected from the top of the current block.

Although it is described above that a pred_mode indicating whether adirect mode is applied is confirmed first and then a merge_flag isconfirmed, it is also possible that the merge_flag is confirmed firstand then the pred_mode may be confirmed.

Additionally, unlike Table 1, when a skip mode that does not transmit aresidual signal is applied or a merge mode is applied without thetransmission of a residual signal, an upper level parameter set not aparameter set of a prediction unit level may notify related informationin relation to whether a residual signal is transmitted.

Moreover, when a skip mode is applied, by adding a syntax indicating aprediction direction to a parameter set, a uni-direction prediction anda bi-directional prediction may be effectively performed.

For example, by applying a skip mode to a B slice decoded through anintra prediction or an inter prediction using a plurality of referenceindices and a plurality of motion vectors and indicating a predictiondirection, a uni-directional prediction, for example, an L0 directionprediction or an L1 direction prediction, may be effectively performedin the B slice. Here, L0 and L1, are reference picture lists. L0 is alist having an assigned index which is lower as a correspondingreference picture is closer to a current picture in a forward direction(i.e. the past direction on a time axis), and L1 is a list having anassigned index which is lower as a corresponding reference picture iscloser to a current picture in a reverse direction (i.e. the futuredirection on a time axis). Accordingly, in the case of the B slice, asthe skip mode is applied, one of three prediction directions (forexample, the L0 direction, the L1 direction and the bi-direction) may bedesignated as a prediction direction.

When the skip mode is applied, a prediction direction indicator (forexample, inter_pred_idc) indicating a prediction direction may beintroduced as a syntax notifying a prediction direction.

Table 2 illustrates an example of syntax when inter_pred_idc is used.

TABLE 2 prediction_unit(x0, y0, currPredUnitSize){  if (slice_type!=I)  skip_flag  if(skip_flag){   if (slice_type==B)    inter_pred_idc  if(mv_competition_flag){    if(inter_pred_idc!=Pred_L1 &&NumMVPCand(L0)> 1)     mvp_idx_l0    if(inter_pred_idc!=Pred_L0 &&NumMVPCand(L1)> 1)     mvp_idx_l1   }  }  else{

In Table 2, when the skip mode is applied (skip_flag=1), as mentionedabove, inter_pred_idc may indicate one direction of three predictiondirections (the L0 direction, the L1 direction and the bi-direction).For example, (1) when inter_pred_idc=0, it may indicate an L0directional prediction, (2) when inter_pred_idc==1, it may indicate anL1 directional prediction, and (3) when inter_pred_idc==2, it mayindicate a bi-directional prediction.

FIG. 8 is a view illustrating a method of configuring prediction modeinformation and transmitting it in an encoding device according to anembodiment of the present invention.

Referring to FIG. 8 , an encoding device may configure a parameter setfirst in operation S810. The parameter set is configured according to apredetermined syntax structure and includes specific information to betransmitted to a decoder. The parameter set may be referred to as asyntax for corresponding information. When a skip mode is applied, anencoding device may configure a parameter in order to include anindicator that indicates a list of reference pictures using a motionvector through the skip mode.

At this point, an encoding device may configure a parameter set in orderto include an indicator that does not simply indicate a referencepicture list but indicates a specific reference picture or referenceblock. The reference picture may be a specific picture in a referencepicture list, and the reference block may be one of blocks around acurrent block or a co-located block.

The encoding device transmits the configured parameter set to a decodingdevice in operation S820. Information on the parameter set is encodedand delivered to the decoding device through bitstream.

The decoding device that receives the parameter set may obtaininformation for decoding the current block. The received parameter setmay include information indicating a prediction direction in a skipmode. When the skip mode is applied, the decoding device may obtainmotion information on a current block by using an indicated predictiondirection, that is, by using an MVP with indicated reference picturelist.

When the transmitted information directly indicates a reference block towhich a skip mode is to be applied, the motion vector of a current blockmay be derived using the motion vector of a corresponding referenceblock. Since the skip mode is applied, a prediction block generatedthrough the reference block that a corresponding motion vector indicatesmay be used as block of pixel values for a current block.

<Integration of AMVP Mode and Merge Mode—Cost Estimation and AMVPCandidate List Change>

Moreover, two derivation modes of motion information, the AMVP mode andthe merge mode, are similar to each other in that pixel information on acurrent block is obtained through motion information derived from blocksaround the current block and a residual signal (including the case thatno residual signal is delivered because there is no residual).Accordingly, using a mode that AMVP mode and merge mode are integratedmay be considered.

In the AMVP mode and merge mode, candidate blocks used for derivingmotion information on a current block may be different. For example, inthe AMVP mode, motion vectors of several candidate blocks may be used ascandidate MVPs, and by using one of the candidate MVPs, motioninformation on the current block may be derived. In the merge mode, byusing the motion vector of a candidate block selected from the candidateblocks at the left of the current block and the candidate blocks at thetop of the current block, motion information on the current block may bederived.

However, even if candidate blocks of the AMVP mode and candidate blocksof the merge mode are different from each other, an area searched toselect candidate blocks (that is, a candidate MVPs) in the AMVP modeincludes merge candidates. For example, in the case of FIG. 6 where theAMVP mode is applied, areas 610 and 620 searched to select candidateblocks A and B may include candidate blocks 710 and 720 which areselected for merge mode in the case of FIG. 7 where the merge mode isapplied.

Additionally, as a method of deriving motion information on the currentblock, the AMVP mode and the merge mode may be sequentially applied. Thetransmitted information amount may be reduced by deriving informationnecessary for the mode to be used later from the first applied mode. Forexample, it is assumed that the AMVP mode is applied, and the merge modeis used if the AMVP mode is determined not to be used. Then, informationused for AMVP mode (e.g., information on a candidate block such as acandidate MVP) is combined in order to derive information necessary forapplying the merge mode. For example, information on a skip flag used inthe AMP mode, information on a syntax representing a prediction mode,and information on AMVP candidates may be combined in order to reducethe amount of information used for representing the merge mode.

In more detail, a candidate of the merge mode may be considered duringcalculating of costs for selecting the best candidate from AMVPcandidates.

Hereinafter, an aspect of an encoding device and an aspect of a decodingdevice will be separately described.

(1) Encoding Aspect

As mentioned above, if merge candidates are considered duringcalculating of costs for AMVP candidates, calculating of costs for theAMVP mode and the merge mode may be simplified at the side of anencoding device. Therefore, encoding complexity may be reduced.

In more detail, an encoding device may check costs when the AMVP mode isapplied to the current bock. At this point, the encoding device mayseparately check costs for the skip mode and costs for the direct mode,respectively.

If costs for the skip mode are less than those for the direct mode, byusing at least one of the two conditions 1) and 2) as below, a processfor calculating costs for the merge mode may be passed. If costs for theskip mode are less than those for the direct mode, after comparing costsfor a candidate for the skip mode and a candidate for the direct mode,it is determined that the skip mode is to be applied. Costs for themerge mode that transmits a residual signal while using a motion vectorof a neighbor block in a way similar to the direct mode may be similarto those of the direct mode. If an AMVP candidate block is an alreadyreviewed candidate block during comparing of costs for the skip mode andthe direct mode, calculating of costs for the merge mode may not beperformed on a corresponding candidate block.

1) Whether an AMVP candidate block or a candidate MVP, which is selectedfrom the top area and the left area of the current block, is identicalto a candidate block or a candidate motion vector of the merge mode.(hereinafter, for convenience of description, an AMVP candidate block ora candidate MVP is referred to as an AMVP candidate, and a candidateblock or a candidate motion vector of the merge mode is referred to as amerge candidate.

2) Whether the best MVP determined through AMVP is identical to a mergecandidate. When only using the condition 1),

(a) When AMVP candidate selected from the left area of the current block(refer to 610 of FIG. 6 ) is identical to a merge candidate selectedfrom the left area of the current block, cost calculation on the casethat the current block is merged into the merge candidate which isselected from the left area of the current block is excluded duringcalculating of costs for the merge mode.

(b) When an AMVP candidate selected from the top area of the currentblock (refer to 620 of FIG. 6 ) is identical to a merge candidateselected from the top area of the current block, cost calculation on thecase that the current block is merged into the merge candidate which isselected from the top area of the current block is excluded duringcalculating of costs for the merge mode.

(c) If necessary, a combination of (a) and (b) may be applied. Forexample, when (a) and (b) are simultaneously satisfied, cost calculationon a merge candidate selected from the left or top area of the currentblock may be excluded or an entire process for calculating costs for themerge mode may be excluded during calculating of costs for the mergemode.

When using the conditions 1) and 2),

(a) When the best MVP determined through AMVP is in the left area of thecurrent block (refer to 610 of FIG. 6 ) and is identical to a mergecandidate selected from the left area of the current block, costcalculation on the case that current block is merged into the selectedmerge candidate is excluded during calculating of costs for the mergemode.

(b) When the best MVP determined through AMVP is in the top area of thecurrent block (refer to the area B of FIG. 6 ) and is identical to amerge candidate selected from the top area of the current block, costcalculation on the case that the current block is merged into theselected merge candidate is excluded during calculating of costs for themerge mode.

(c) If necessary, a combination of (a) and (b) may be applied. Forexample, when (a) and (b) are simultaneously satisfied, cost calculationon a merge candidate selected from the left or top area of the currentblock may be excluded or an entire process for calculating costs for themerge mode may be excluded during calculating of costs for the mergemode.

FIG. 9 is a flowchart illustrating a method of calculating costs forprediction candidates in an encoding device according to an embodimentof the present invention.

Referring to FIG. 9 , an encoding device (for example, a predictionmodule) calculates costs for AMVP candidates in operation S910.

The encoding device determines whether a merge candidate is included inthe AMVP candidate in operation S920. At this point, whether the mergecandidate is included in the AMVP candidate includes determining whetherone of entire AMVP candidates is identical to the merge candidate anddetermining whether the best AMVP candidate is identical to the mergecandidate. Detailed description for each case is identical to the abovedescription.

When the merge candidate is included in the AMVP candidate, (that is,the merge candidate is identical to one of AMVP candidates), costcalculation on the case that the current block is merged into acorresponding merge candidate is excluded in operation S930. If themerge candidate is not included in the AMVP candidate, costs on the casethat the merge candidate is merged into a corresponding merge candidateare calculated in operation S940.

(2) Decoding Device Aspect

When the skip mode is not applied (skip_flag==0) and an inter predictionis applied (pred_mode==MODE INTER), even if both a merge_flag (forexample, merge_flag) and/or a flag indicating a merge direction/target(for example, merge_left_flag) are not transmitted, a decoding devicemay derive motion information on a current block. At this point, thefollowing condition may be used.

Condition: Whether an AMVP candidate and a merge candidate selected forthe left area and the top area of a current block (for example, theareas A and B of FIG. 6 ) are identical

When the above condition is applied,

(a) When an AMVP candidate selected from the left area of the currentblock (refer to the area A of FIG. 6 ) is identical to a merge candidateselected from the left area of the current block, if the merge mode isapplied (merge_flag==1), the current block may be merged into theselected merge candidate. Accordingly, a flag indicating that thecurrent block is merged into a merge candidate of which side (forexample, merge_left_flag) may not be transmitted from an encodingdevice.

(b) When an AMVP candidate selected from the top area of the currentblock (refer to the area B of FIG. 6 ) is identical to a merge candidateselected from the top area of the current block, if the merge mode isapplied (merge_flag==1), the current block may be merged into theselected merge candidate. Accordingly, a flag indicating with whichmerge candidate on which side of the current block the current block isto be merged (for example, merge_left_flag) may not be transmitted fromencoding device.

(c) If necessary, a combination of (a) and (b) may be applied. Forexample, when an AMVP candidate selected from the left area of thecurrent block and an AMVP candidate selected from the top area of thecurrent block are identical to a merge candidate selected from the leftarea of the current block and a merge candidate selected from the toparea of the current block, respectively, the merge mode may not beapplied. Accordingly, a flag indicating whether the merge mode is to beapplied (for example, merge_flag) and a flag indicating with which mergecandidate on which side of the current block the current block is to bemerged (for example, merge_left_flag) may not be transmitted from anencoding device.

FIG. 10 is a flowchart illustrating a method of performing the mergemode in a decoding device according to an embodiment of the presentinvention. Referring to FIG. 10 , the decoding device may determinewhether the merge mode is applied in operation S1010.

When the merge mode is applied, it is determined whether at least one ofmerge candidates is included in AMVP candidates. At this point, whetherthe merge candidate is included in the AMVP candidate includesdetermining whether one of entire AMVP candidates is identical to themerge candidate and determining whether the best AMVP candidate isidentical to the merge candidate. Detailed description for each case isidentical to the above description.

If the merge candidates are not identical to the AMVP candidates, a flagindicating with which merge candidate on which side of the current blockthe current block is merged is decoded in operation S1030, and the mergeis performed according to the flag in operation S1050. If one of themerge candidates is identical to any AMVP candidate, a flag indicatingwith which merge candidate on which side of the current block the AMVPcandidate is merged is not decoded in operation S1040, and the currentblock is merged into a merge candidate which is different with the AMVPcandidate in operation S1050. Here, not decoding the flat indicatingwith which merge candidate on which side of the current block thecurrent clock is merged includes not performing decoding with the reasonthat a corresponding flat is not transmitted from an encoding device.

Another method of integrating an AMVP using method (AMVP mode) and amerge mode can be proposed. In this method, a merge candidate may beconsidered during generating of an AMVP candidate. That is, when everyAMVP candidates is different from a merge candidate, the merge candidatemay be added as an AMVP candidate and an AMVP mode may be applied. Atthis point, by considering the similarity between the AMVP mode and themerge mode, an encoding device may signal to a decoding device to useonly one of the AMVP mode and the merge mode. Here, “signal” meanstransmitting related information and/or instruction.

First, the encoding device compares an AMVP candidate list with a mergecandidate list in order to check whether an AMVP candidate and a mergecandidate are identical with respect to a neighboring area of thecurrent block (for example, the left and/or top area of the currentblock 610 or 620 of FIG. 6 ).

When some or entire merge candidates are not in the AMVP list (that is,there is a merge candidate not included in the AMVP candidate) withrespect to a neighboring area of the current block, the merge candidateinstead of the AMVP candidate may be added to the AMVP candidate list.Accordingly, the AMVP candidates may be extended.

At this point, without signaling for the merge mode, signaling forapplying the list of the extended AMVP candidates and the AMVP mode maybe made. For example, when a residual signal is transmitted, signalingmay be made in order to perform the direct mode using the extended AMVPcandidates.

As mentioned above, besides the method of extending AMVP candidates byadding a merge candidate to an AMVP candidate list, by competing some orall of AMVP candidates with a merge candidate, some or all of the AMVPcandidates may be replaced/modified with/into the merge candidate. Inthis case, an encoding device may signal to a decoding device in orderto apply the AMVP mode on the basis of the changed AMVP candidate list.

FIG. 11 is a flowchart illustrating an operation of changing an AMVPcandidate according to an embodiment of the present invention.

Referring to FIG. 11 , an encoding device (for example, a predictionmodule) creates an AMVP candidate list and a merge candidate list for acurrent block in operation S1110.

The encoding device determines whether an AMVP candidate and a mergecandidate are identical on the basis of the AMVP candidate list and themerge candidate list in operation S1120. For example, the encodingdevice may confirm whether there is a merge candidates not included inthe AMVP candidates.

The encoding device may change the AMVP candidate list by using a mergecandidate not included in the AMVP candidate list in operation S1130. Atthis point, the encoding device may add a merge candidate not includedin the AMVP candidate list to the AMVP candidate list, and may changepart of the AMVP candidate list into a merge candidate(s).

The encoding device may signal the changed AMVP candidate list to thedecoding device in operation S1140. At this point, the signaling of theencoding device may include signaling to transmit the changed AMVPcandidate list or signaling to change the AMVP candidate list.

FIG. 12 is a view illustrating a method of performing prediction on thebasis of a changed AMVP list in a decoding device according to anembodiment of the present invention. Referring to FIG. 12 , the decodingdevice receives signaling from an encoding device in operation S1210.

The signaling from the decoding device includes an AMVP candidate list.Additionally, the signaling from the encoding device may be signalingwhich is for changing the AMVP candidate list.

When receiving the changed AMVP candidate list, the decoding devicereplaces the existing AMVP candidate list and when receiving signalingto change the AMVP candidate list, the decoding device changes the AMVPcandidate list according to the signaling.

The decoding device selects the best MVP on the basis of the changedAMVP candidate list and performs prediction with the best MVP inoperation S1220.

<Integration of AMVP Using Method and Merge Mode—Integration Mode andSignaling>

In the case of the merge mode, motion information on a current block isderived from neighbor blocks. The merge mode in which a residual signalis transmitted is similar to the above-mentioned direct mode.Accordingly, the application of an integrated merge mode (whichtransmits a residual signal) and direct mode may be considered.

For example, when the direct mode is applied by a coding block (i.e. acoding unit) unit, if the merge mode may be applied by the coding blockunit and a partition unit of a split coding block, the merge mode may beintegrated with the direct mode in the same unit as the direct mode.

Identically, if a unit of an applied direct mode and a processing unitof an applied merge mode are identical among processing units such as acoding block, a prediction block, a transform block, the direct mode andthe merge mode may be integrated and applied with respect to acorresponding processing unit.

Here, although the integration of the merge mode in which a residualsignal is delivered and the direct mode in which a residual signal istransmitted and an AMVP is used is described as an example, a similarmode, for example, a merge mode not transmitting a residual signal or askip mode not transmitting a residual signal through an AMVP may beintegrated using the same method.

Accordingly, the merge mode and the AMVP mode may be integrated andapplied through a method described below. A specific method of theintegration may include a method of generating/deriving a neighborcandidate block or candidate motion vector (hereinafter, referred to asa candidate), which may be used for deriving motion information on acurrent block. This will be described later.

In relation to the method of integrating the AMVP mode and the mergemode and applying the integrated mode, a necessary syntax structure willbe described. The integration of the merge mode and the direct mode inthe AMVP mode will be described below as an example.

When the merge is performed by a partition unit of a split coding block(a coding block may be a coding unit), signaling may be made to selectand apply one of the merge mode and the direct mode, with respect to acorresponding partition.

FIG. 13 is a flowchart illustrating a signaling method of selecting adirect mode and a merge mode according to an embodiment of the presentinvention.

Referring to FIG. 13 , after it is determined first whether the skipmode and the direct mode are applied, an inter prediction (that is, aninter mode) and an intra prediction (that is, an intra mode) areclassified. In the case of the inter prediction mode, the merge mode maybe applied according to merge_flag.

First, as mentioned above, it is determined whether the skip mode is tobe applied according to skip_flag in operation S1310. When skip_flagindicates a skip mode, the skip mode is applied in operation S1320, andwhen skip_flag does not indicate a skip mode, it is determined againwhich prediction mode is to be applied in operation S1330. At thispoint, a syntax indicating a prediction mode (for example, Pred_mode)may be transmitted.

If the direct mode is indicated in operation S1330, the direct mode isapplied in operation S1340, and if the direct mode is not indicated, aprediction mode may be indicated again with pred_mode in operationS1350. In operation S1350, pred_mode may indicate an intra mode and aninter mode.

When the intra mode is indicated in operation S1350, an intra predictionis applied to a current block in operation S1370, and when the intermode is indicated in operation S1360, it may be determined whether themerge mode is to be applied to the current block in operation S1380. Atthis point, in order to indicate/determine whether the merge mode is tobe applied, merge_flag may be used. When merge_flag indicates a mergemode, the merge mode is applied in order to derive motion information ona current block in operation S1390.

Whether to apply the merge mode may be determined by each partition. Forexample, when an entire coding block (coding block may be a coding unit)is one partition, whether to apply the merge mode on the entire codingblock is determined and when the coding block is split into a pluralityof partitions, whether to apply the merge mode by each partition unit isdetermined. The partition of a split coding block may be a coding block,a prediction block, or a transform block.

When the coding block is determined as one partition, the direct mode orthe merge mode may be applied to a corresponding coding block. However,since information on the direct mode and the merge mode is transmittedthrough different signaling parts, i.e. different parameter sets in theexisting method, despite the similarities between the two modes,information tends to be transmitted redundantly (that is, redundancyoccurs).

However, if whether to apply the merge mode is determined by a partitionunit, the merge mode and the AMVP mode (for example, a direct mode) maybe applied to the same partition unit. Accordingly, information on theAMVP mode (for example, a direct mode) and the merge mode may betransmitted through the same signaling part, that is, the same parameterset.

For example, a method of integrating a merge mode (a) and a direct mode(b) may be considered. The merge mode (a) is applied when an entirecoding block is one partition among merge modes dealt in the signalingpart (below operation S1360) for the inter mode of FIG. 13 . The directmode (b) is dealt in the signaling part (operation S1340) for the directmode of FIG. 13 . At this point, candidates of the direct mode, that isAMVP candidates, and merge candidates are integrated, and by using acandidate selected from the integrated candidates, the AMVP mode (forexample, the direct mode) or the merge mode may be applied.

FIG. 14 is a view illustrating signaling through the integration of adirect mode and a merge mode according to an embodiment of the presentinvention. Hereinafter, for convenience of description, the mergeapplied when an entire coding block is determined as one partition isreferred to as a coding block merge and the merge applied by a partitionunit when a coding block is split into a plurality of partitions isreferred to as a partition merge.

Referring to FIG. 14 , the case that the direct mode is applied by thecoding block unit is described as an example. Accordingly, theintegrated mode of the merge mode and the direct mode, which may beapplied by a partition unit for using an entire coding block as onepartition is described with reference to FIG. 14 .

Referring to FIG. 14 , it is determined whether the skip mode is to beapplied according to skip_flag in operation S1410. When skip_flagindicates a skip mode, the skip mode is applied in operation S1420, andwhen skip_flag does not indicate a skip mode, it is determined againwhich prediction mode is to be applied in operation S1430. At thispoint, a syntax indicating a prediction mode (for example, Pred_mode)may be transmitted.

Unlike FIG. 13 , a syntax (that is, a Pre-mode) may be signaled based onintegration of the direct mode and the merge mode in operation S1440. Inrelation to the coding block unit, in consideration of the similaritybetween the direct mode and the merge mode, as mentioned above,signaling for applying the integrated mode of the coding block merge andthe direct mode may be made in operation S1440.

When integrated mode of the merge mode and the direct mode is notapplied by a coding block unit, the prediction mode may be indicatedwith pred_mode again in operation S1450. At this point, pred_mode mayindicate whether prediction mode is an intra mode or an inter mode.

When the intra mode is indicated in operation S1450, an intra predictionis applied to a current block in operation S1470, and when the intermode is indicated in operation S1460, it is determined whether the mergemode is to be applied to the current block in operation S1480. At thispoint, in order to indicate/determine whether the merge mode is applied,merge_flag may be used. When merge_flag indicates a merge mode, themerge mode is to be applied to the current block in operation S1490.Referring to FIG. 14 , the coding block merge may be applied inoperation S1440, and a partition merge may be applied in operationS1490.

Additionally, referring to FIG. 14 , in order to indicate which one ofthe direct mode and the merge mode is to be applied, a flag may be usedin operation S1440. A specific method of handling the case that one oftwo modes is indicated with a flag will be described together with acandidate of when a direct mode and a coding block merge are integrated.

FIG. 15 is a view illustrating embodiment of signaling whether a directmode is to be applied or a coding block merge is to be applied through aflag according to the present invention.

Referring to FIG. 15 , when the flag is used, it is determined whetherthe direct mode is to be applied or the coding block merge is to beapplied according to the indication of the flag in operation S1500. Forexample, when the flag value is 0, the direct mode is applied inoperation S1510, and when the flag value is 1, the coding block merge isapplied in operation S1520.

Additionally, when signaling is made on whether to apply the direct modeor the coding block merge in operation S1440 of FIG. 14 , the mode maynot be explicitly indicated using a flag and whether to apply the directmode or the coding block merge may be derived.

FIG. 16 is a view illustrating a method of deriving a determination onwhether to apply a direct mode or a coding block merge according to anembodiment of the present invention.

Referring to FIG. 16 , through derivation instead of explicit indicationor signaling, whether to apply the direct mode or the coding block mergemay be determined in operation S1600. In order for a decoding device toderive a determination on which mode to be applied, information on aneighbor coding block, for example, a spatial neighbor block and/or atemporal neighbor block may be used. Additionally, statisticalinformation on a picture that the current coding block belongs to orstatistical information on a picture decoded earlier than a picture thatthe current coding block belongs to may be used.

According to the derived result, the direct mode is applied in operationS1610 or the coding block merge is applied in operation S1620.

Meanwhile, as described with reference to FIGS. 6 and 7 , the directmode and the merge mode have a difference in a method of obtaining acandidate. However, the two modes are integrated and motion informationon the current block is determined in the integrated mode.

In the integrated mode, motion information on the current block may bedetermined from the following five candidate blocks. That is, an AMVPcandidate block used in the direct mode and a merge mode candidate blockmay be integrated.

Candidate Blocks of Integrated Mode

(1) A Block Selected from the Left Area of the Current Block

For example, a block selected from 610 of FIG. 6 , may be selected as acandidate block of an integrated mode.

As a method of selecting a candidate block from the left area of thecurrent block, a method of selecting a candidate through an AMVP may beused. For example, while searching is made from the left area to thebottom or top direction, a first available block may be selected. Ablock in an intra mode may be regarded as an unavailable block and maybe excluded from an AMVP candidate.

A specific block among blocks at the left area of the current block maybe selected as a candidate block of an integrated mode. For example, ablock which meets the corner block at the bottom left may be specifiedas a candidate of an integrated mode selected from the left area of thecurrent block and then may be used.

(2) A Block Selected from the Top Area of the Current Block

For example, a block selected from 620 of FIG. 6 , may be selected as acandidate block of an integrated mode.

As a method of selecting a candidate block from the top area of thecurrent block, a method of selecting a candidate through an AMVP may beused. For example, while searching is made from the top area to the leftor right direction, a first available block may be selected. A block inan intra mode may be regarded as an unavailable block and may beexcluded from an AMVP candidate.

A specific block among blocks at the top area of the current block maybe selected as a candidate block of an integrated mode. For example, ablock which meets the corner block at the top right may be specified asa candidate of an integrated mode selected from the top area of thecurrent block and then may be used.

(3) Block(s) Selected from the Corner Areas of the Current Block

For example, blocks selected from 630, 640, or 650 of FIG. 6 , may beselected as a candidate block of an integrated mode.

As a method of selecting a candidate block from the left area of thecurrent block, a method of selecting a candidate through an AMVP may beused. For example, while searching is made on blocks at the corner areasof the current block, a first available block may be selected. A blockin an intra mode may be regarded as an unavailable block and may beexcluded from an AMVP candidate.

Specific blocks at the corner areas of the current block may be selectedas a candidate blocks of an integrated mode. For example, blocks at eachcorner of the current block (for example, 630, 640, or 650 of FIG. 6 )may be specified as a candidate blocks of an integrated mode selected atthe corner areas of the current block, and may be used.

(4) A Co-Located Block of the Current Block

Besides a spatial neighbor block, a temporal neighbor block for thecurrent block, may be used as a candidate. For example, a co-locatedblock with respect to the current block may be used as a candidate of anintegrated mode. A method of selecting an AMVP candidate may beidentically applied to a co-located block, or a co-located block of aspecific reference picture may be used as a candidate.

(5) A Candidate Derived Through a Combination of the Above Candidates

For example, a median value of the candidates derived from (1), (2), and(3), may be used as a candidate of an integrated mode. Moreover, amotion vector selected from the same or different reference frame onlist (L0 or L1) which is same with that of a co-located block may bederived as a candidate. Or, a motion vector selected from the same ordifferent reference frame on list (L0 or L1) which is different withthat of a co-located block may be derived as an additional candidate.

When prediction is performed using motion information on candidates forthe integrated mode described as above (1) to (5), conditions on aprediction direction may be applied together and information thereon maybe transmitted. The conditions may be

(1) Using motion information on an L0 direction

(2) Using motion information on an L1 direction

(3) Using motion information on a combined list of L0 and L1 (forexample, using a combined list of L0 and L1 or using average informationof L0 and L1 motions)

In Addition, for example, in order to reflect all two features of thedirect mode and the merge mode, motion information on the current blockmay be determined from a candidate block set whose number of candidateblocks is less than the number of candidate blocks used for the directmode and greater than the number of candidate blocks used for the codingblock merge. At this point, the current block may be a coding block, aprediction block, or a transform block.

FIG. 17 is a flowchart illustrating signaling when an integrated mode isapplied according to the present invention. Referring to FIG. 17 , inorder to apply the integrated mode, it is determined first through anAMVP/merge_flag (merge_flag) whether a merge mode is to be applied inoperation S1710. The AMVP/merge_flag is a flag indicating whether toapply a merge mode or an AMVP mode. On the basis of the AMVP/merge_flagthat an encoding device transmits, a decoding device may determinewhether to apply a merge mode or an AMVP mode. For example, when theflag value is 0, the AMVP mode is applied, and when the flag value is 1,the merge mode is applied. At this point, instead of the AMVP/mergeflag, a conventional merge flag may be transmitted. In this case, it maybe possible that when the merge flag value is 1, the merge mode isapplied, and when the merge flag value is 0, the AMVP mode is applied.

Then, an integrated mode candidate index is transmitted in operationS1710. A decoding device may confirm the best candidate for a mode (forexample, a merge mode or an AMVP mode) which is indicated by theAMVP/merge flag or the merge flag, through the integrated mode candidateindex transmitted from an encoding device.

Even when the merge mode is applied, the integrated mode candidate indexmay indicate which candidate among candidates of integrated modeincluding candidates at the corner in addition to merge candidates atthe left and top areas of the current block and co-located block of thecurrent block in a reference picture is used for merging. Accordingly,motion information on further various candidates may be utilized.

A decoding device may apply a mode that the AMVP/merge flag or the mergeflag indicates on a candidate that the integrated mode candidate indexindicates in order to derive motion information on the current block.

Moreover, when it is determined through the AMVP/merge flag or the mergeflag (merge_flag) that the merge mode is to be applied, a mergecandidate and a prediction direction may be determined. The mergecandidate and the prediction direction may be transmitted as acandidate/direction index. The candidate/direction index may indicatewhether prediction is performed in a uni-direction (for example, an L0direction or an L1 direction) or a bi-direction, in addition toindicating which candidate is used for merging. At this point, acandidate that the candidate/direction index indicates may be one ofcandidates of the integrated mode.

Additionally, at least one of the merge candidate and the predictiondirection may be derived according to a predetermined method or may bedetermined according to a predetermined rule. Information not derived orpredetermined may be transmitted from an encoding device to a decodingdevice.

At this point, an index indicating which candidate is used for applyingthe merge mode and an index indicating a prediction direction may beseparately transmitted. When the index indicates with which candidate amerge mode/a direct mode is applied, as mentioned above, the index mayindicate which candidate among candidates including candidates at thecorners of the current block and co-located block candidates as well ascandidates at the left and top areas of a current area.

Additionally, when the index indicates a prediction direction, the indexmay indicate uni-direction or bi-direction and also may indicate one ofL0 and L1 directions when indicating the uni-direction.

Since the index may indicates a candidate of the integrated mode andalso a prediction direction, prediction may be performed on the currentblock by using detailed motion information.

Here, although the method of using the merge mode of the integrated modeis described, the method of the above-mentioned description may beidentically applied to the AMVP mode of the integrated mode.

Hereinafter, a method of selecting the best candidate in an integratedmode will be described.

FIG. 18 is a view illustrating an area where candidate blocks of anintegrated mode are selected according to an embodiments of the presentinvention.

As mentioned above, candidate blocks of an integrated mode may beselected from (1) the left area A 1810 of the current block 1800, (2)the top area B 1820 of the current block 1800, (3) the corner areas C1830, 1840, and 1850 of the current block 1800, (4) a combination of (1)to (3), and (5) a block T 1860 co-located at the position of the currentblock 1800.

When it is determined that a merge mode is to be applied through a mergeflag, a candidate block to which the merge mode is to be applied may beselected from the integrated mode candidate blocks of (1) to (5).Additionally, when it is determined that an AMVP mode (that is, a skipmode/a direct mode) is to be applied through the merge flag, a candidateblock for deriving motion information on the current block in the AMVPmode may be selected from the integrated mode candidate blocks of (1) to(5).

At this point, when the merge mode is applied using the integrated modecandidates,

1) Two candidates may be selected like a conventional merge mode andthen the current block may be merged into one of the two candidateblocks through MVC. As the MVC method it may be used a method ofcalculating costs for merging a motion vector of each candidate block,and based on this, selecting one candidate block. At this point, the twocandidate blocks, as the case of FIG. 7 , may be the candidate block atthe left top of the current block and the candidate block at the topleft of the current block, respectively. At this point, in addition tothe a spatial neighbor block for the current block a temporal neighborblock, for example, the co-located block T 1860, may be used as acandidate.

2) The two candidate blocks may be selected through (1) and (2)described above for the candidate blocks of the integrated mode. Forexample, the two candidate blocks may be selected through a method ofsearching each AMVP candidate from the left area 1810 and the top area1820 of the current block. Additionally, specific blocks positioned atthe left area 1810 and the right area 1820 of the current block may bethe block A′ at the left bottom and the block B′ at the top right. Theco-located block T 1860 for the current block may be also used as acandidate.

3) Additionally, unlike a conventional merge mode, all blocks spatiallyneighboring to the current block may be used as candidate blocks. Forexample, all the candidate blocks (1) to (3) of the above integratedmode may be used as candidate blocks. Moreover, a co-located block withrespect to the current block may be also used as a candidate. At thispoint, with limiting the number of candidate blocks used, one candidateblock may be selected from candidate blocks in a corresponding number.In this case, with putting an order on an availability determination,after the determination is made according to the order, a candidate listmay be configured according to the determined available order. Forexample, as a result determined according to the order, the lowest indexis assigned to the determined first available candidate. Also, as acandidate is determined later, a higher index may be assigned.

On the basis of the configured candidate list, a merge target candidatewhich is used for merging may be selected through a process of selectingthe best candidate, as mentioned above.

For example, available candidate blocks may be searched from thecandidate blocks of the integrated mode spatially positioned around thecurrent block according to the described order (1) to (3) of theintegrated mode candidate blocks, i.e., the order of the left area 1810of the current block 1800→the top area 1820 of the current block1800→the corner areas 1830, 1840, and 1850 of the current block 1800. Atthis point, in the case that specific blocks at the left area 1810 andthe top area 1820 of the current block 1800 are used, a candidate listmay be configured by determining the availability in the order ofA′→B′→the corner blocks 1830, 1840, and 1850. Additionally, for thecorner blocks also, the availability may be determined by a specificorder. For example, by starting search from the corner block 1830 inorder to search an adjacent corner block after the top area is searched,the availability may be determined in the order of the corner block1830→the corner block 1840→the corner block 1850 or the corner block1830→the corner block 1850→the corner block 1840.

If there is an unavailable candidate block according to the searchresult, as mentioned above, a new candidate is selected or generated byusing the searched candidate blocks. Additionally, although the numberof candidate blocks is determined in order to select the best candidateby configuring candidate list, even when the number of availablecandidate blocks is less than the number of candidate blocksconstituting the candidate list, as mentioned above, a new candidateblock may be selected or generated.

Moreover, when the AMVP mode is applied using the integrated modecandidate,

1) Two candidates may be selected from candidate blocks spatiallypositioned around the current block like a merge mode and then one ofthe two candidate blocks may be selected as the best candidate throughMVC. As the MVC method, it may be used a method of calculating costs forusing an MVP of each candidate block, and based on this, selecting thebest candidate block. At this point, a temporal neighbor blocks as wellas spatial neighbor blocks for the current block, for example, theco-located block T 1860, may be used as a candidate.

2) The two candidate blocks may be selected through (1) and (2)described above for the candidate blocks of the integrated mode. Forexample, the two candidate blocks may be selected through a method ofsearching each AMVP candidate from the left area 1810 and the top area1820 of the current block. Additionally, specific blocks positioned atthe left area 1810 and the right area 1820 of the current block may bethe block A′ at the left bottom and the block B′ at the top right. Theco-located block T 1860 for the current block may be also used as acandidate.

Unlike the conventional merge mode using two candidate blocks, in thecase of the AMVP mode using more candidate blocks, a search order may bedetermined in order to two available candidate blocks. For example, onecandidate block may be selected by searching the left area 1810 of thecurrent block 1800 including the corner block 1850 and one candidateblock may be selected by searching the top area 1820 of the currentblock 1800 including the corner block 1830. At this point, the cornerblock 1840 may be included in the left area of the current block 1800 ormay be included in the top area of the current block 1800 in order forsearching. Accordingly, one candidate block may be selected from theareas 1810, 1840, and 1850, and one candidate block may be selected fromthe areas 1820 and 1830. Also, one candidate block is selected from theareas 1810 and 1850 and one candidate block may be selected from theareas 1820, 1830, and 1840.

When specific blocks are designated from the left area 1810 and the toparea 1820 of the current block 1800 and used, one candidate block may beselected from the block A′ and the corner blocks 1840 and 1850, and onecandidate may be selected from the block B′ and the corner block 1830,or, one candidate block may be s elected from the block A′ and thecorner block 1850, and one candidate block may be selected from theblock B′ and the corner blocks 1830 and 1840.

Without dividing an area on the basis of a current block for searching,an entire area may be searched as one unit. For example, searching maybe made from corner block 1830 toward the corner block 1850 through thecorner block 1840. Additionally, searching may be alternately made fromthe corner blocks at the top and the right. For example, while searchingis made in the order of the corner block 1830→the corner block 1850→theleft area 1810 or the block A′→the top area 1820 or the block B′→thecorner block 1840, available two blocks may be selected by order offirst search.

3) All blocks spatially located around the current block may be used ascandidate blocks. For example, all the candidate blocks described in (1)to (3) of the above integrated mode (that is, a candidate block selectedfrom the top area of the current block, a candidate block selected fromthe left area, and a candidate block(s) selected from the corner area orpositioned at the corner area) may be used as candidate blocks.Moreover, a co-located block with respect to the current block may bealso used as a candidate.

At this point, with limiting the number of candidate blocks used, onecandidate block may be selected from candidate blocks in a correspondingnumber. In this case, with putting an order on an availabilitydetermination, after the determination is made according to the order, acandidate list may be configured according to the determined availableorder. On the basis of the candidate list, the best candidate may beselected as mentioned above.

For example, available candidate blocks may be searched from thecandidate blocks of the integrated mode spatially positioned around thecurrent block according to the described order (1) to (3) of theintegrated mode candidate blocks, i.e., the order of the left area 1810of the current block 1800→the top area 1820 of the current block1800→the corner areas 1830, 1840, and 1850 of the current block 1800. Inthe case that specific blocks at the left area 1810 and the top area1820 of the current block 1800 are used, they may be selected bydetermining the availability in the order of A′→B′→the corner blocks1830, 1840, and 1850. Additionally, for the corner blocks also, theavailability may be determined by specific order. For example, bystarting search from the corner block 1830 in order to search anadjacent corner block after the top area is searched, searching may bemade in the order of the corner block 1830→the corner block 1840→thecorner block 1850 or the corner block 1830→the corner block 1850→thecorner block 1840.

If there is an unavailable candidate block according to the searchresult, as mentioned above, a new candidate is selected or generated byusing the searched candidate blocks. Additionally, although the numberof candidate blocks is determined in order to select the best candidateby configuring candidate list, even when the number of availablecandidate blocks is less than the number of candidate blocksconstituting the candidate list, as mentioned above, a new candidateblock may be selected or generated.

FIG. 19 is a flowchart illustrating a method of generating a predictioncandidate by applying an integrated mode and transmitting correspondinginformation in an encoding device according to an embodiment of thepresent invention.

Referring to FIG. 19 , the encoding device determines a mode to beapplied on a current block and determines candidates used for performingprediction through a corresponding mode in operation S1910.

A method of selecting candidates of an integrated mode is describedabove.

Then, the encoding device configures a parameter set in operation S1920.The parameter set may be configured according to a syntax structure oncorresponding information, and may be configured to include informationon an integrated mode used for the prediction of the current block andinformation relating to the candidates of the determined integratedmode.

The encoding device transmits the configured parameter set in operationS1930. Information on the parameter set may be encoded and transmittedto the decoding device through bitstream.

FIG. 20 is a flowchart illustrating a method of performing prediction byapplying an integrated mode in a decoding device according to anembodiment of the present invention.

Referring to FIG. 20 , the decoding device receives the parameter setfrom the encoding device in operation S2010. The parameter set isencoded and transmitted through bitstream, and includes information onan integrated mode used for prediction and information relating to acandidate of the integrated mode.

The decoding device may obtain information relating to the prediction ofthe current block from the received parameter set in operation S2020.The decoding device may determine a prediction mode of the current blockon the basis of the information transmitted from the decoding devicethrough the parameter set. The prediction mode may be an integrated modeof the merge mode and the AMVP mode. Which one mode of the merge modeand the AMVP mode is to be applied may be determined through a flag inthe parameter set. The decoding device may determine the best candidatefor a prediction mode, which is to be applied on the basis ofinformation on the candidate of the integrated mode obtained from theparameter set. A method of determining a candidate of an integrated modeis described above.

The decoding device applies a predetermined prediction mode, forexample, a merge mode or an AMVP mode, on the current block, andperforms prediction on the current block by using the determined motioninformation on the best candidate in operation S2030.

In the above exemplary system, although the methods are described basedon the flowchart using a series of operations and blocks, the presentinvention is not limited to the order of the operations. Additionally,the above embodiments include various aspects of embodiments.Accordingly, the present invention includes all other replacements,modifications, and changes within the scope of the claims below.

In the description of the present invention until now, when onecomponent is referred to as being “connected” or “accessed” to anothercomponent, it can be directly connected or accessed to the othercomponent or intervening component may also be present. On the contrary,when one component is “directly connected to” or “direction accessed to”another component, it should be understood as there is no componentbetween the two components.

1-10. (canceled)
 11. An inter prediction method performed by a decodingapparatus, the method comprising: receiving a merge index and a mergeflag for inter prediction of a current block; deriving an interprediction mode of the current block into a merge mode based on themerge flag; constructing a merge candidate list for deriving motioninformation of the current block based on neighboring candidate blocksof the current block; selecting a specific merge candidate from themerge candidate list based on the merge index; deriving the motioninformation of the current block based on motion information of theselected merge candidate; and performing prediction for the currentblock based on the derived motion information, wherein based on theinter prediction being the merge mode, the neighboring candidate blocksinclude spatial neighboring blocks and a temporal neighboring block, thespatial neighboring blocks are a left neighboring block, an upperneighboring block, a bottom left corner neighboring block, an upper leftcorner neighboring block, an upper right corner neighboring block,wherein the left neighboring block is a lowest block among leftneighboring blocks adjacent to a left boundary of the current block, thelowest block is adjacent to an upper boundary of the bottom left cornerneighboring block, wherein the upper neighboring block is a rightmostblock among upper neighboring blocks adjacent to an upper boundary ofthe current block, the rightmost block is adjacent to a left boundary ofthe upper right corner neighboring block, and wherein the temporalneighboring block is a co-located block at same position as the currentblock in a reference picture.
 12. A method of encoding video informationperformed by an encoding apparatus, the method comprising: determiningan inter prediction mode of the current block, wherein the interprediction mode is a merge mode; constructing a merge candidate list forderiving motion information of the current block based on neighboringcandidate blocks of the current block; selecting a specific mergecandidate from the merge candidate list; generating the motioninformation of the current block based on motion information of theselected merge candidate; generating a prediction sample of the currentblock based on the generated motion information; generating a residualsample of the current block based on the prediction sample; generatingresidual information for the residual sample and a merge indexindicating the selected specific merge candidate from the mergecandidate list; and encoding video information including a merge flagfor the determined inter prediction mode, the merge index and theresidual information, wherein based on the inter prediction mode beingthe merge mode, the neighboring candidate blocks include a leftneighboring block, an upper neighboring block, a bottom left cornerneighboring block, an upper left corner neighboring block, an upperright corner neighboring block, and a temporal neighboring block,wherein the left neighboring block is a lowest block among leftneighboring blocks adjacent to a left boundary of the current block, thelowest block is adjacent to an upper boundary of the bottom left cornerneighboring block, wherein the upper neighboring block is a rightmostblock among upper neighboring blocks adjacent to an upper boundary ofthe current block, the rightmost block is adjacent to a left boundary ofthe upper right corner neighboring block, and wherein the temporalneighboring block is a co-located block at same position as the currentblock in a reference picture.
 13. A non-transitory computer-readablestorage medium storing video information including a merge flag, a mergeindex and residual information encoded by the method of encoding videoinformation of claim 12.